package com.xiyu.service.controller.admin.mailbox;
import com.xiyu.service.vo.mailbox.mailApprove.MailApproveRevertInput;
import com.xiyu.service.vo.mailbox.mailApprove.MailApproveDoneInput;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;

import jakarta.validation.*;

import com.xiyu.service.framework.web.web.core.pojo.PageResult;
import com.xiyu.service.framework.web.web.core.pojo.CommonResult;
import static com.xiyu.service.framework.web.web.core.pojo.CommonResult.success;

import com.xiyu.service.framework.excel.core.util.ExcelUtils;

import com.xiyu.service.framework.operateLog.core.annotations.OperateLog;
import static com.xiyu.service.framework.operateLog.core.enums.OperateTypeEnum.*;

import com.xiyu.service.service.mailbox.MailApproveService;

@Tag(name = "邮件审批")
@RestController
@RequestMapping("/mailbox/mail-approve")
@Validated
public class MailApproveController {

    @Resource
    private MailApproveService mailApproveService;

    @PostMapping("/done")
    @Operation(summary = "审批通过")
    public CommonResult<Boolean> done(@Valid @RequestBody MailApproveDoneInput inputVO) {
        return success(mailApproveService.done(inputVO));
    }

    @PostMapping("/revert")
    @Operation(summary = "驳回审批")
    public CommonResult<Boolean> revert(@Valid @RequestBody MailApproveRevertInput inputVO) {
        return success(mailApproveService.revert(inputVO));
    }

}
